<?php

use \App\HttpController\Router;



//管理后台
Router::group(['prefix'=>'manage','namespace'=>'Admin'],function (){
    //登录部分
    Router::post('login', 'LoginController/login');
    Router::get('captcha', 'LoginController/captcha');
    //首页
    Router::get('', 'IndexController');
    Router::post('upload', 'UploadController/upload');
    //店铺管理
    Router::group(['prefix'=>'shop'],function (){
        Router::get('', 'ShopController/index');
        Router::get('all', 'ShopController/all');
        Router::post('update', 'ShopController/update');
        Router::post('open', 'ShopController/open');
        Router::post('close', 'ShopController/close');
        Router::post('destroy', 'ShopController/destroy');
    });

    //菜品管理
    Router::group(['prefix'=>'food'],function (){
        Router::get('', 'FoodController/index');
        Router::post('update', 'FoodController/update');
        Router::post('unlock', 'FoodController/unlock');
        Router::post('lock', 'FoodController/lock');
        Router::post('destroy', 'FoodController/destroy');
    });

    //管理人员
    Router::group(['prefix'=>'operate'],function (){
        Router::get('', 'OperateController/index');
        Router::post('update', 'OperateController/update');
        Router::post('destroy', 'OperateController/destroy');
    });
});
